"use strict";

/**
 * @auther wtfssd
 * Created by wtfssd on 2017/12/4
 */
import * as React from 'react'

const {View, ScrollView} = require('react-native');
const {connect} = require('react-redux');
const NavigationBar = require('react-native-navbar').default;

import {commonProps, commonStyles} from "../../assets/styles/common";
import NavBackButton from "../../component/BackButton";
import Colors from "../../assets/styles/Colors";
import WhiteSpace from "../../component/WhiteSpace";

const appInfo = require('../../../app.json');
const {List} = require('antd-mobile');
const {Actions} = require("react-native-router-flux");

class AboutPage extends React.Component<any, any> {
    render() {
        return (
            <View style={[commonStyles.container]}>
                <NavigationBar {...commonProps.navBar}
                               leftButton={<NavBackButton/>}
                               title={{title: '关于', tintColor: Colors.White}}
                />
                <ScrollView>
                    <List>
                        {/*<WhiteSpace color={Colors.Background}/>*/}
                        {/*<List.Item arrow='horizontal'>在微博上关注我们</List.Item>*/}
                        {/*<List.Item arrow='horizontal'>在微信公众上关注我们</List.Item>*/}
                        <WhiteSpace color={Colors.Background} height={30}/>
                        <List.Item arrow='horizontal'
                                   onClick={Actions.web.bind(this, {source: require('../../assets/html/service.html')})}
                        >服务条款</List.Item>
                        <List.Item arrow='horizontal'
                                   onClick={Actions.web.bind(this, {source: require('../../assets/html/privacy_policy.html')})}
                        >隐私政策</List.Item>
                        <List.Item arrow='horizontal'
                                   onClick={Actions.web.bind(this, {source: require('../../assets/html/specification.html')})}
                        >社区规范</List.Item>
                        <WhiteSpace color={Colors.Background} height={30}/>
                        <List.Item extra={appInfo.version} arrow='horizontal' >版本</List.Item>
                    </List>
                </ScrollView>
            </View>
        );
    }
}


export default AboutPage;